added a language variant field to the page rendering hash, but only for languages...
authorZheng Zhu <zhengzhu@users.mediawiki.org>
Mon, 20 Sep 2004 05:22:45 +0000 (05:22 +0000)
committerZheng Zhu <zhengzhu@users.mediawiki.org>
Mon, 20 Sep 2004 05:22:45 +0000 (05:22 +0000)
includes/User.php

index 332c6fc..a38f60c 100644 (file)
@@ -814,6 +814,7 @@ class User {
        }
 
        function getPageRenderingHash() {
+        global $wgLang;
                if( $this->mHash ){
                        return $this->mHash;
                }
@@ -830,6 +831,12 @@ class User {
                $confstr .= '!' . $this->getOption( 'date' );
                $confstr .= '!' . $this->getOption( 'numberheadings' );
 
+        // add in language variant option if there are multiple variants
+        // supported by the language object
+        if(sizeof($wgLang->getVariants())>1) {
+             $confstr .= '!' . $this->getOption( 'variant' );
+        }
+
                $this->mHash = $confstr;
                return $confstr ;
        }